package com.fire.social.entity.node;

import com.fire.social.entity.BaseNode;
import lombok.Data;
import org.neo4j.ogm.annotation.NodeEntity;
import org.springframework.data.neo4j.core.schema.GeneratedValue;
import org.springframework.data.neo4j.core.schema.Id;
import org.springframework.data.neo4j.core.schema.Property;
import org.springframework.data.neo4j.core.schema.Relationship;

import java.util.List;

@Data
@NodeEntity(label = "Content")
public class Content extends BaseNode {

    @Property(name = "content")
    private String content;
    @Property(name = "imgurl")
    private String imgurl;
    @Property(name = "time")
    private String createTime;
    @Property(name = "title")
    private String title;
    @Property(name = "related_hobby")
    private String relatedHobby;
    @Property(name = "hobbyid")
    private Long hobbyid;
    @Property(name = "publisher")
    private String publisher;
    @Property(name = "publisher_img")
    private String publisherImg;
    @Property(name = "publish_account")
    private String account;

    @Relationship(type = "Praised",direction = Relationship.Direction.OUTGOING)
    private List<User> praisers;

}
